//
//  NSObject+swizzle.m
//  TotalDemo
//
//  Created by gujian on 16/7/25.
//  Copyright © 2016年 gujian. All rights reserved.
//

#import "NSObject+swizzle.h"
#import <objc/runtime.h>

@implementation NSObject (swizzle)

//+ (void)load
//{
//    Class targetClass = [self class];
//    SEL originSelector = @selector(respondsToSelector:);
//    SEL replaceSelector = @selector(swizzle_respondsToSelector:);
//    
//    Method originMethod = class_getInstanceMethod(targetClass, originSelector);
//    Method replaceMethod = class_getInstanceMethod(targetClass, replaceSelector);
//    
//    method_exchangeImplementations(originMethod, replaceMethod);
//}

- (BOOL)swizzle_respondsToSelector:(SEL)aSelector
{
    NSLog(@"Selector:%s \n", [NSStringFromSelector(aSelector) UTF8String]);
    return [self swizzle_respondsToSelector:aSelector];
}

@end
